package com.bsth.service.impl;

import com.bsth.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;

/**
 * Created by BSTH on 2017/7/10.
 */
public class UserServiceImpl implements UserService{
	@Autowired
	private JdbcTemplate jdbcTemplate;

	@Override
	public void addUser(String name, int age) {
		jdbcTemplate.update("insert into USER(name ,age) VALUES (?,?)",name,age);
	}

	@Override
	public void deleteUser(String name) {
		jdbcTemplate.update("delete from USER where name = ?",name);
	}

	@Override
	public Integer getAllUsers() {
		return null;
	}

	@Override
	public void deleteAllUsers() {

	}
}
